{template header}

    {template sidebar}

    <div class="article">
        {template title}

    <!--{if $a == 'index'}-->
        <table>
            <tr>
                <th>用户名</th>
                <th width="15%">角色</th>
                <th width="20%">上次登录时间</th>
                <th width="10%">状态</th>
                <th width="25%">操作</th>
            </tr>
        <!--{if $result}-->
            <!--{loop $result $v}-->
            <tr>
                <td>{$v['author']}</td>
                <td>{$this->group[$v['sid']]['title']}</td>
                <td>{echo formatDate($v['lastdate'])}</td>
                <td>{$this->status[$v['status']]}</td>
                <td class="operate">
                    <!--{if $v["id"] != $this->admin['id']}-->
                    <a href="">权限</a>
                    <!--{/if}-->
                    <a href="{$this->url($c, 'edit', array('id' => $v['id']))}">编辑</a>
                    <!--{if $v["id"] != $this->admin['id'] && $this->group[ $this->admin['sid'] ]['admin'] > 0 }-->
                    <a title="删除{$this->name}" class="del" href="{$this->url($c, 'del', array('id' => $v['id']))}">删除</a>
                    <!--{/if}-->
                </td>
            </tr>
            <!--{/loop}-->
        <!--{else}-->
            <tr>
                <td colspan="5">没有{$this->name}!</td>
            </tr>
        <!--{/if}-->
        <!--{if $pager}-->
            <!--分页开始-->
            <tr>
                <td colspan="3">
                    <div class="page">{$pager}</div>
                </td>
                <td colspan="2">
                    <div class="search">
                        <input type="text" name="key" id="key" placeholder="请输入用户名" />
                        <a href="{$this->url( $c, null, $get )}"class="btn btn-success">搜索</a>
                    </div>
                </td>
            </tr>
            <!--分页结束-->
        <!--{/if}-->
            <tr>
                <td colspan="5" class="over">
                    <a class="btn btn-success" href="{$this->url($c, 'add')}">添加{$this->name}</a>
                </td>
            </tr>
        </table>
    <!--{/if}-->
    <!--{if $a == 'edit' || $a == 'add'}-->
        <form method="post" action="{$this->url($c, 'save', array('id' => $result['id']) )}">
            <table>
                <tr>
                    <td class="td1" width="25%">{$this->name}姓名：</td>
                    <td class="td2">
                        <input type="text" name="author" placeholder="请输入{$this->name}姓名" class="required username" value="{$result['author']}" />
                    </td>
                </tr>
                <tr>
                    <td class="td1">{$this->name}密码：</td>
                    <td class="td2">
                        <input type="password" name="pass" placeholder="请输入{$this->name}密码" class="required" />
                    </td>
                </tr>
                <tr>
                    <td class="td1">重复{$this->name}密码：</td>
                    <td class="td2">
                        <input type="password" name="pass1" placeholder="请重复输入{$this->name}密码" class="required pass" />
                    </td>
                </tr>
                <tr>
                    <td class="td1">所在部门：</td>
                    <td class="td2">
                        <select name="sid">
                            <!--{loop $this->group $v}-->
                            <option value="{$v['id']}"{$v['id'] === $result['sid'] ? ' selected' : ''}>{$v['title']}</option>
                            <!--{/loop}-->
                        </select>
                    </td>
                </tr>
                <tr>
                    <td class="td1">联系电话：</td>
                    <td class="td2">
                        <input type="text" name="phone" placeholder="请输入联系电话" class="required" value="{$result['phone']}" />
                    </td>
                </tr>
                <tr>
                    <td class="td1">Email：</td>
                    <td class="td2">
                        <input type="text" name="email" placeholder="请输入Email" class="required" value="{$result['email']}" />
                    </td>
                </tr>
                <tr>
                    <td colspan="2" class="td4 over">
                        <a class="btn btn-success save" href="{$this->url($c)}">保存</a>
                    </td>
                </tr>
            </table>
        </form>
    <!--{/if}-->
    </div>
    <!-- artile end -->
{template footer}